#!/bin/sh
# This regression test is a part of SIPp.
# An ereg with search_in="hdr" header="To" looks at the To header, not
# at the X-Forward-To or Topic headers before it. Text that isn't a
# header name (header="tag=") is still found in the middle of a line.
. "`dirname "$0"`/../functions"; init

sippfg -sf uas.xml -i 127.0.0.1 -p 25810 -m 1 >/dev/null 2>&1 &
job=$!
sippfg -sf uac.xml -i 127.0.0.1 -p 25811 -m 1 127.0.0.1:25810 \
    -timeout 4 -timeout_error >/dev/null 2>&1
status=$?
wait $job || status=1

if test $status -ne 0; then
    fail "a regexp did not match its header"
else
    ok
fi
